package models;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;

import java.util.Arrays;

import org.junit.Before;
import org.junit.Test;

public class testSubscription {
	
	private Subscription subscription;
	private Client client = new Client();
	private Workshop workshop = new Workshop();
		
	@Before
	public void setup(){
		subscription = new Subscription(client, workshop);
		client.setId(1);
		workshop.setId(1);
	}
	
	@Test
	public void testSubscriptionConstruction() {
		assertEquals(client, subscription.getClient());
		assertEquals(workshop, subscription.getWorkshop());
	}
	
	@Test
	public void testGetDataheaders() {
		String[] expected = {"client", "workshop"};
		assertEquals(Arrays.asList(expected), Arrays.asList(subscription.getDataHeaders()));
	}
	
	@Test
	public void testGetData() {
		String[] expected = {"1", "1"};
		assertEquals(Arrays.asList(expected), Arrays.asList(subscription.getData()));
	}
	
	@Test
	public void test_equalsAndHashCode() {
		// TODO see client
		fail();
	}
	
}
